IQueue
Ecng.Collections
Defines a generic queue interface for enqueueing, dequeueing, and peeking at items.
Methoden
Dequeue
public T Dequeue()
result = iQueue.Dequeue()
Removes and returns the item at the front of the queue.
Rückgabe: The item at the front of the queue.
Enqueue
public void Enqueue(T item)
iQueue.Enqueue(item)
Adds an item to the back of the queue.
- item
- The item to add to the queue.
Peek
public T Peek()
result = iQueue.Peek()
Returns the item at the front of the queue without removing it.
Rückgabe: The item at the front of the queue.
TryDequeue
public bool TryDequeue(T item)
result = iQueue.TryDequeue(item)
Removes the item from the queue.
- item
- The removed item.
Rückgabe: if the item is successfully removed; if the IQueue is empty.